using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain
{
    /// <summary>
    /// 审批审计实体基类
    /// 继承自普通审计类，专门用于需要审批流程的实体
    /// </summary>
    public class ApprovalAuditableEntityBase : AuditableEntityBase
    {
        /// <summary>
        /// 审批状态
        /// 0-待审批 1-审批中 2-已通过 3-已驳回 4-已撤回
        /// </summary>
        public int ApprovalStatus { get; set; } = 0;

        /// <summary>
        /// 审批人ID
        /// </summary>
        public int? ApprovalBy { get; set; }

        /// <summary>
        /// 审批人姓名
        /// </summary>
        [MaxLength(255)]
        public string? ApprovalByName { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public DateTime? ApprovalTime { get; set; }

        /// <summary>
        /// 审批意见
        /// </summary>
        [MaxLength(1000)]
        public string? ApprovalComments { get; set; }

        /// <summary>
        /// 审批流程编号
        /// </summary>
        [MaxLength(100)]
        public string? ProcessDetailCode { get; set; }

        /// <summary>
        /// 提交审批时间
        /// </summary>
        public DateTime? SubmittedTime { get; set; }

        /// <summary>
        /// 提交审批人ID
        /// </summary>
        public int? SubmittedBy { get; set; }

        /// <summary>
        /// 提交审批人姓名
        /// </summary>
        [MaxLength(255)]
        public string? SubmittedByName { get; set; }

        /// <summary>
        /// 撤回时间
        /// </summary>
        public DateTime? WithdrawnTime { get; set; }

        /// <summary>
        /// 撤回人ID
        /// </summary>
        public int? WithdrawnBy { get; set; }

        /// <summary>
        /// 撤回人姓名
        /// </summary>
        [MaxLength(255)]
        public string? WithdrawnByName { get; set; }

        /// <summary>
        /// 撤回原因
        /// </summary>
        [MaxLength(500)]
        public string? WithdrawnReason { get; set; }
    }
}

